top_builddir = ../..

include ../../config.mk

.SUFFIXES: .lo

SRCS = sqlrmysqlcredentials.cpp
OBJS = sqlrmysqlcredentials.$(OBJ)

CPPFLAGS = $(WERROR) $(BASECPPFLAGS) $(EXPORTSCPPFLAGS) $(SQLRSERVERCFLAGS) $(RUDIMENTSCFLAGS) $(FWPKCFLAGS)
LIBS = $(SQLRSERVERLIBS) $(RUDIMENTSLIBS)

.cpp.lo:
	$(LTCOMPILE) $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(COMPILE) $< $(OUT)$@

.cpp.obj:
	$(LTCOMPILE) $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(COMPILE) $<

all: lib$(SQLR)mysqlcredentials.$(LIBEXT)

clean:
	$(LTCLEAN) $(RM) *.lo *.o *.obj *.$(LIBEXT) *.lib *.exp *.idb *.pdb *.manifest

lib$(SQLR)mysqlcredentials.$(LIBEXT): $(SRCS) $(OBJS)
	$(LTLINK) $(LINK) $(OUT)$@ $(OBJS) $(LDFLAGS) $(LIBS) $(LINKFLAGS)

install: $(INSTALLLIB)

installdll:
	$(MKINSTALLDIRS) $(bindir)
	$(LTINSTALL) $(CP) lib$(SQLR)mysqlcredentials.$(LIBEXT) $(bindir)

installlib:
	$(MKINSTALLDIRS) $(libdir)
	$(LTINSTALL) $(CP) lib$(SQLR)mysqlcredentials.$(LIBEXT) $(libdir)
	$(LTFINISH) $(libdir)

uninstall: $(UNINSTALLLIB)

uninstalldll:
	$(LTUNINSTALL) $(RM) $(bindir)/lib$(SQLR)mysqlcredentials.$(LIBEXT)

uninstalllib:
	$(LTUNINSTALL) $(RM) $(libdir)/lib$(SQLR)mysqlcredentials.$(LIBEXT) \
				$(libdir)/libsqlrmysqlcredentials.$(LIBEXT)
